package it.polimi.swimv2.remote;

import java.util.Collection;

import it.polimi.swimv2.entities.Feedback;
import it.polimi.swimv2.entities.User;
import it.polimi.swimv2.exception.UserNotFoundException;

import javax.ejb.Remote;

@Remote
public interface UserProfileManagerRemote {

	/**
	 * Returns the User specified by the username.
	 * 
	 * @param username
	 * @return
	 * @throws UserNotFoundException
	 *             when such an User does not exists.
	 */
	public User getUserDetail(String username) throws UserNotFoundException;

	/**
	 * Returns the feedbacks associated to the specified user.
	 * 
	 * @param username
	 * @return the feedbacks received
	 */
	public Collection<Feedback> getFeedbackOf(String username);

	/**
	 * Returns true if the specified users are friends
	 * 
	 * @param username1
	 * @param username2
	 * @return true if are friends, otherwise false
	 */
	public boolean areFriend(String username1, String username2);

	/**
	 * Returns true if exists a pending friendship request between the two
	 * specified users.
	 * 
	 * @param username1
	 * @param username2
	 * @return true if exists a pending friendship request
	 */
	public boolean existFriendshipRequest(String username1, String username2);
}
